package top.zhangjianyong.tools.service.mybatis.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.zhangjianyong.tools.entity.Vegetable;
import top.zhangjianyong.tools.mapper.VegetableMapper;
import top.zhangjianyong.tools.service.mybatis.IVegetableService;

/**
 * @author ： zhangjianyong
 * @date ： 2022/11/23 2:00 PM
 */
@Service
public class IVegetableServiceImpl extends ServiceImpl<VegetableMapper, Vegetable> implements IVegetableService {

    @Override
    public Vegetable getOneByNoAndDate(String no, String date) {
        return lambdaQuery().eq(Vegetable::getNo, no)
                .eq(Vegetable::getEatDate, date).one();
    }
}
